<template>
    <div class="aside">
        <div>
        <ul>
            <li v-for="item of list" :key="item.id">
                <router-link :to="{path:'/fenlei-view/xiangqing',query:{imgUrl:item.imgUrl}}">
                    {{item.title}}
                </router-link>
            </li>
        </ul>
        </div>
    </div>
    <div id="xiangQing">
        <router-view/>
    </div>

</template>

<script>
    import {getBanner} from "../../api";

    export default {
        name: "AsideTabBarComWgl",
        data(){
            return{
                list:[]
            }
        },
        mounted() {
            getBanner('/fenlei-list')
                .then(response=>{
                    console.log(response.data)
                    this.list = response.data
                })
        },
        methods:{

        }
    }
</script>

<style scoped>
.aside{
    float: left;
    width: 20%;
    height: 100%;
    position: fixed;
    display: flex;
    line-height: 2.65;
    overflow: hidden;
}
div{
    width: 100%;
}
    li{
        text-align: center;
        height: 30px;
        margin-top: 20px;
        font-size: 14px;
        color: #333;
    }
    a:hover{
        color: red;
    }
    ::after{
        width: 1px;
        background-color: #d9d9d9;
        top: 0;
        bottom: 0;
        content: "";
        position: absolute;
        transform-origin: 100% 50% 0;
        right: 0;
    }
    #xiangQing{
        width: 80%;
        float: right;
    }
</style>